package com.cmsr.hdpf.model

case class RsmDataStream(
                                var timestamp:Long, // 消息时间戳
                                var id: String, // 聚类 id，即为车辆id
                                var user:String = "this",
                                var pt_list: String,
//                                var device_id: String, // 目标类型
//                                var lane_id: String, // 目标ID
//                                var longitude: Double, // 目标经度
//                                var latitude: Double, // 目标维度
//                                var speed: Double, // 速度，m/s
//                                var flow: Double, // 流量
                        ) extends TrafficDataStream {
    override def toString(): String = {
        "timestamp"+this.timestamp.toString + ",id:" +
                this.id + ",tr len:"+this.pt_list.length+",tr pts:"+ this.pt_list
//                this.device_id + "," +
//                this.lane_id + "," +
//                this.longitude.toString + "," +
//                this.latitude.toString + "," +
//                this.speed.toString + "," +
//                this.flow.toString
    }

    def toJsonString(): String = {
        "{" +
                "timestamp:" + "'" + this.timestamp + "'," +
                "id:" + "'" + this.id + "'," +
                "tr len:"+ this.pt_list.length+ "'," +
                "tr pts:"+ this.pt_list +
//                ",device_id:" + "'" + this.device_id + "'" +
//                ",lane_id:" + "'" + this.lane_id + "'" +
//                ",longitude:" + "'" + this.longitude.toString + "'" +
//                ",latitude:" + "'" + this.latitude.toString + "'" +
//                ",speed:" + "'" + this.speed.toString + "'" +
//                ",flow:" + "'" + this.flow.toString + "'" +
                "}"
    }
}
